<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>Introduction_to_Algorithms: IntroductionToAlgorithm::TreeAlgorithm::BinaryTree&lt; NodeT &gt; Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Introduction_to_Algorithms
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">IntroductionToAlgorithm::TreeAlgorithm::BinaryTree&lt; NodeT &gt; Struct Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>BinaryTree：二叉树，算法导论10章10.4节  
 <a href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="binarytree_8h_source.html">binarytree.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a9a441f3f41c5b69758204ba60fe02010"><td class="memItemLeft" align="right" valign="top">typedef NodeT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html#a9a441f3f41c5b69758204ba60fe02010">NodeType</a></td></tr>
<tr class="separator:a9a441f3f41c5b69758204ba60fe02010"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af231d881ec1d08492b2b5b5638e5e373"><td class="memItemLeft" align="right" valign="top">typedef NodeT::KeyType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html#af231d881ec1d08492b2b5b5638e5e373">KeyType</a></td></tr>
<tr class="separator:af231d881ec1d08492b2b5b5638e5e373"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:adc9b1c18fd12ab56de09e92005848abf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html#adc9b1c18fd12ab56de09e92005848abf">BinaryTree</a> ()</td></tr>
<tr class="memdesc:adc9b1c18fd12ab56de09e92005848abf"><td class="mdescLeft">&#160;</td><td class="mdescRight">默认函数  <a href="#adc9b1c18fd12ab56de09e92005848abf">More...</a><br /></td></tr>
<tr class="separator:adc9b1c18fd12ab56de09e92005848abf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96fa515f1c3b4176a03c37b8ea582339"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html#a96fa515f1c3b4176a03c37b8ea582339">to_xml</a> ()</td></tr>
<tr class="memdesc:a96fa515f1c3b4176a03c37b8ea582339"><td class="mdescLeft">&#160;</td><td class="mdescRight">to_xml:返回本树的<code>xml</code>描述。  <a href="#a96fa515f1c3b4176a03c37b8ea582339">More...</a><br /></td></tr>
<tr class="separator:a96fa515f1c3b4176a03c37b8ea582339"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aa0d43af70ef50ff59740dced2e832074"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html#a9a441f3f41c5b69758204ba60fe02010">NodeType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html#aa0d43af70ef50ff59740dced2e832074">root</a></td></tr>
<tr class="separator:aa0d43af70ef50ff59740dced2e832074"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename NodeT&gt;<br />
struct IntroductionToAlgorithm::TreeAlgorithm::BinaryTree&lt; NodeT &gt;</h3>

<p>BinaryTree：二叉树，算法导论10章10.4节 </p>
<p>二叉树通过一个root（若引用）指向一个节点对象。当root为空时，树为空 </p>

<p>Definition at line <a class="el" href="binarytree_8h_source.html#l00032">32</a> of file <a class="el" href="binarytree_8h_source.html">binarytree.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="af231d881ec1d08492b2b5b5638e5e373"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename NodeT&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef NodeT::KeyType <a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html">IntroductionToAlgorithm::TreeAlgorithm::BinaryTree</a>&lt; NodeT &gt;::<a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html#af231d881ec1d08492b2b5b5638e5e373">KeyType</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>树的节点存储数据的类型 </p>

<p>Definition at line <a class="el" href="binarytree_8h_source.html#l00035">35</a> of file <a class="el" href="binarytree_8h_source.html">binarytree.h</a>.</p>

</div>
</div>
<a class="anchor" id="a9a441f3f41c5b69758204ba60fe02010"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename NodeT&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef NodeT <a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html">IntroductionToAlgorithm::TreeAlgorithm::BinaryTree</a>&lt; NodeT &gt;::<a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html#a9a441f3f41c5b69758204ba60fe02010">NodeType</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>树的节点类型 </p>

<p>Definition at line <a class="el" href="binarytree_8h_source.html#l00034">34</a> of file <a class="el" href="binarytree_8h_source.html">binarytree.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="adc9b1c18fd12ab56de09e92005848abf"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename NodeT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html">IntroductionToAlgorithm::TreeAlgorithm::BinaryTree</a>&lt; NodeT &gt;::<a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html">BinaryTree</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>默认函数 </p>
<p>新建的二叉树默认为空 </p>

<p>Definition at line <a class="el" href="binarytree_8h_source.html#l00041">41</a> of file <a class="el" href="binarytree_8h_source.html">binarytree.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a96fa515f1c3b4176a03c37b8ea582339"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename NodeT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string <a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html">IntroductionToAlgorithm::TreeAlgorithm::BinaryTree</a>&lt; NodeT &gt;::to_xml </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>to_xml:返回本树的<code>xml</code>描述。 </p>
<dl class="section return"><dt>Returns</dt><dd>: 树的<code>xml</code>描述的字符串</dd></dl>
<p>该函数获取本树的<code>xml</code>描述 </p>

<p>Definition at line <a class="el" href="binarytree_8h_source.html#l00051">51</a> of file <a class="el" href="binarytree_8h_source.html">binarytree.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="aa0d43af70ef50ff59740dced2e832074"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename NodeT&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html#a9a441f3f41c5b69758204ba60fe02010">NodeType</a>&gt; <a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html">IntroductionToAlgorithm::TreeAlgorithm::BinaryTree</a>&lt; NodeT &gt;::root</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>树的根节点，时一个指向节点对象的强引用 </p>

<p>Definition at line <a class="el" href="binarytree_8h_source.html#l00059">59</a> of file <a class="el" href="binarytree_8h_source.html">binarytree.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>src/tree_algorithms/binarytree/<a class="el" href="binarytree_8h_source.html">binarytree.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_introduction_to_algorithm.html">IntroductionToAlgorithm</a></li><li class="navelem"><a class="el" href="namespace_introduction_to_algorithm_1_1_tree_algorithm.html">TreeAlgorithm</a></li><li class="navelem"><a class="el" href="struct_introduction_to_algorithm_1_1_tree_algorithm_1_1_binary_tree.html">BinaryTree</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.10 </li>
  </ul>
</div>
</body>
</html>
